home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
tset.z
/
tset
Wrap
Text File
|
1998-10-20
|
8KB
|
199 lines
TTTTSSSSEEEETTTT((((1111)))) TTTTSSSSEEEETTTT((((1111))))
NNNNAAAAMMMMEEEE
tset - terminal dependent initialization
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ttttsssseeeetttt [ options ]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_T_s_e_t causes terminal dependent processing such as setting erase and kill
characters, setting or resetting delays, and the like. It first
determines the _t_y_p_e of terminal involved, names for which are specified
by the /_u_s_r/_l_i_b/_t_e_r_m_i_n_f_o data base, and then does necessary
initializations and mode settings. In the case where no argument types
are specified, _t_s_e_t simply reads the terminal type out of the environment
variable TERM and re-initializes the terminal. The rest of this manual
concerns itself with type initialization, done typically once at login,
and options used at initialization time to determine the terminal type
and set up terminal modes.
When used in a startup script ".profile" (for _s_h(1) users) or ".login"
(for _c_s_h(1) users), it is desirable to give information about the types
of terminal usually used, for terminals which are connected to the
computer through a modem. These ports are initially identified as being
_d_i_a_l_u_p or _p_l_u_g_b_o_a_r_d or _a_r_p_a_n_e_t etc. To specify what terminal type is
usually used on these ports, ----mmmm is followed by the appropriate port type
identifier, an optional baud-rate specification, and the terminal type to
be used if the mapping conditions are satisfied. If more than one
mapping is specified, the first applicable mapping prevails. A missing
type identifier matches all identifiers.
Baud rates are specified as with _s_t_t_y(1), and are compared with the speed
of the diagnostic output (which is almost always the control terminal).
The baud rate test may be any combination of: >>>>, ====, <<<<, @@@@, and !!!!; @@@@ is a
synonym for ==== and !!!! inverts the sense of the test. To avoid problems
with metacharacters, it is best to place the entire argument to ----mmmm within
'' characters; users of _c_s_h(1) must also put a "\" before any "!" used
here.
Thus
tset -m 'dialup>300:adm3a' -m dialup:dw2
causes the terminal type to be set to an _a_d_m_3_a if the port in use is a
dialup at a speed greater than 300 baud; to a _d_w_2 if the port is
(otherwise) a dialup (i.e., at 300 baud or less). If the _t_y_p_e above
begins with a question mark, the user is asked if the user really wants
that type. A null response means to use that type; otherwise, another
type can be entered which will be used instead. For other ports the port
type will be taken from the ////eeeettttcccc////ttttttttyyyyttttyyyyppppeeee file or a final, default _t_y_p_e
option may be given on the command line not preceded by a ----mmmm. A ttytype
may be preceded with a question mark in ////eeeettttcccc////ttttttttyyyyttttyyyyppppeeee for prompting (this
is an enhancement over standard _t_s_e_t).
PPPPaaaaggggeeee 1111
TTTTSSSSEEEETTTT((((1111)))) TTTTSSSSEEEETTTT((((1111))))
It is often desirable to return the terminal type, as specified by the ----mmmm
options, and information about the terminal to a shell's environment.
This can be done using the ----ssss option; using the Bourne shell, _s_h(1):
eval `tset -s options ... `
or using the C shell, _c_s_h(1):
tset -s options ... > tset$$
source tset$$
rm tset$$
These commands cause _t_s_e_t to generate as output a sequence of shell
commands which place the variable TERM in the environment; see
_e_n_v_i_r_o_n(4).
Once the terminal type is known, _t_s_e_t engages in terminal mode setting.
This normally involves sending an initialization sequence to the terminal
and setting the single character erase (and optionally the line-kill
(full line erase)) characters.
On terminals that can backspace but not overstrike (such as a CRT), and
when the erase character is the default erase character (``#'' on
standard systems), the erase character is changed to a ^H (backspace).
Other options are:
----eeee set the erase character to be the named character _c on all terminals,
the default being the backspace character on the terminal, usually
^H.
----kkkk is similar to ----eeee but for the line kill character rather than the
erase character; _c defaults to ^X (for purely historical reasons); ^U
is the preferred setting. No kill processing is done if ----kkkk is not
specified.
----hhhh do not read the terminal type from the environment variable TERM.
----IIII suppresses outputting terminal initialization strings.
----QQQQ suppresses printing the ``Erase set to'' and ``Kill set to''
messages.
----SSSS Outputs just the strings to be assigned to TERM rather than commands
for a shell.
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
A typical _c_s_h ".login" file using _t_s_e_t would be:
set noglob
set tmp = `tset - -m dialup:?h19 -Q`
setenv TERM "$tmp[1]"
PPPPaaaaggggeeee 2222
TTTTSSSSEEEETTTT((((1111)))) TTTTSSSSEEEETTTT((((1111))))
unset tmp noglob
This ".login" sets the environment variable TERM for the user's current
terminal according to the file /_e_t_c/_t_t_y_t_y_p_e . If the terminal line is a
dialup line, the user is prompted for the proper terminal type.
EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
tset determines which set of commands to use (setenv vs export) by
looking at the SSSSHHHHEEEELLLLLLLL environment variable when the ----ssss option is given.
This is not a problem at login, but for testing shell's other than one's
normal shell, it may be necessary to change the SSSSHHHHEEEELLLLLLLL variable in your
environment.
FFFFIIIILLLLEEEESSSS
/etc/ttytype terminal id to type map database
/usr/lib/terminfo terminal capability database
SSSSEEEEEEEE AAAALLLLSSSSOOOO
csh(1), sh(1), stty(1), environ(4), ttytype(4), terminfo(4).
NNNNOOOOTTTTEEEESSSS
For compatibility with earlier versions of _t_s_e_t, a number of flags are
accepted whose use is discouraged:
----dddd type equivalent to ----mmmm dialup:type
----pppp type equivalent to ----mmmm plugboard:type
----aaaa type equivalent to ----mmmm arpanet:type
----EEEE c Sets the erase character to _c only if the terminal can
backspace.
---- prints the terminal type on the standard output
----rrrr prints the terminal type on the diagnostic output.
PPPPaaaaggggeeee 3333